-
Notifications
You must be signed in to change notification settings - Fork 15
feat: add flow compilation verification at worker startup #474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add flow compilation verification at worker startup #474
Conversation
|
|
View your CI Pipeline Execution ↗ for commit 7b1db0a
☁️ Nx Cloud last updated this comment at |
1bef6d0 to
f98a265
Compare
f98a265 to
c5ef186
Compare
🔍 Preview Deployment: Website✅ Deployment successful! 🔗 Preview URL: https://pr-474.pgflow.pages.dev 📝 Details:
_Last updated: _ |
170589a to
cc15d3c
Compare
c5ef186 to
196bef5
Compare
Merge activity
|
# Flow Compilation at Worker Startup This PR adds automatic flow compilation and verification during worker startup. When a flow worker starts, it now ensures the flow is properly compiled in the database before processing any tasks. Key features: - Adds `ensureFlowCompiled` method to the Queries class to check flow compilation status - Implements flow compilation during worker startup in the `FlowWorkerLifecycle` class - Adds environment detection to determine compilation mode (development vs production) - Introduces `FlowShapeMismatchError` for handling flow structure mismatches - In development mode (local Supabase), mismatched flows are automatically recompiled - In production mode, mismatches throw errors to prevent unexpected behavior The PR includes comprehensive integration tests covering: - Compiling new flows on worker startup - Verifying existing flows with matching structure - Handling mismatches in production mode (throws error) - Recompiling mismatched flows in development mode This ensures flows are always properly compiled before execution, preventing runtime errors from mismatched flow definitions.
cc15d3c to
5e255c3
Compare
196bef5 to
7b1db0a
Compare

Flow Compilation at Worker Startup
This PR adds automatic flow compilation and verification during worker startup. When a flow worker starts, it now ensures the flow is properly compiled in the database before processing any tasks.
Key features:
ensureFlowCompiledmethod to the Queries class to check flow compilation statusFlowWorkerLifecycleclassFlowShapeMismatchErrorfor handling flow structure mismatchesThe PR includes comprehensive integration tests covering:
This ensures flows are always properly compiled before execution, preventing runtime errors from mismatched flow definitions.